package com.zhongxin.wymovieticket.getdata;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import com.zhongxin.wymovieticketentity.HotMovies;

/**
 * 数据存储
 * @author jqw
 *
 */
public class DataStore {

	private static DataStore outInstance;
	
	public static DataStore getInstance(){
		if(outInstance == null){
			outInstance = new DataStore();
		}
		return outInstance;
	}
	
	private List<HotMovies> hotMovies;



	private DataStore() {
		// TODO Auto-generated constructor stub
		
		hotMovies = new LinkedList<HotMovies>();


	}



	public void addHotMoviesEntities(List<HotMovies> hotMovies) {
		if (this.hotMovies != null) {
			this.hotMovies.addAll(0, hotMovies);
		}
	}

	public void appendHotMoviesEntities(List<HotMovies> hotMovies) {
		if (this.hotMovies != null) {
			this.hotMovies.addAll(hotMovies);
		}
	}

	// //////////////////////////////////////
	public List<HotMovies> getTextEntities() {
		return hotMovies;
	}

	
//	/**
//	 * 把获取到的文本段子列表放到最前面，这个方法针对是 下拉刷新的操作
//	 * @param entities
//	 */
//	public void addImageEntities(List<TextEntity> entities){
//		if(entities != null){
//			imageEntities.addAll(0, entities);
//		}
//	}
//	
//	/**
//	 * 把获取到的文本段子列表放到最后面，这个方法针对是 上拉查看旧数据的操作
//	 * @param entities
//	 */
//	public void appendImageEntities(List<TextEntity> entities){
//		if(entities != null){
//			imageEntities.addAll(entities);
//		}
//	}




//	/**
//	 * 获取图片段子的列表
//	 * @return
//	 */
//	public List<TextEntity> getImageEntities(){
//		return imageEntities;
//	}
	
}
